from django.conf.urls.defaults import *
from ChineKingBlog.settings import DEBUG, MEDIA_ROOT

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^ChineKingBlog/', include('ChineKingBlog.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),   
    (r'^admin/filebrowser/', include('ChineKingBlog.filebrowser.urls')),
    (r'^grappelli/', include('ChineKingBlog.grappelli.urls')),
    (r'^admin_tools/', include('ChineKingBlog.admin_tools.urls')),
    (r'^', include('ChineKingBlog.blog.urls')),
)

if DEBUG:
    urlpatterns += patterns('',
        (r'^static/(?P<path>.*)$','django.views.static.serve',{'document_root': MEDIA_ROOT}),
    )
    urlpatterns += patterns('',
        (r'^404/$','django.views.generic.simple.direct_to_template',{'template': '404.html'}),
    )